/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package otcapp.controlador.jpanels;

import java.awt.Image;
import javax.swing.JLabel;
import otcapp.utiles.imagenes.backgrounds.LoadImagen;
import otcapp.utiles.paneles.JPanelConFondo;

/**
 *
 * @author diego
 */
public class CabeceraJPanelPrincipal extends JPanelConFondo {

    /**
     * Creates new form CabeceraJPanel
     */
    public CabeceraJPanelPrincipal() {
        setImagen(new LoadImagen().loadImagen("header-background.jpg"));
        initComponents();
    }
    
    public CabeceraJPanelPrincipal(String nuevoTitulo) {
        setImagen(new LoadImagen().loadImagen("header-background.jpg"));
        initComponents();
        titulo.setText(nuevoTitulo);
    }
    
    public JLabel getIcono() {
        return icono;
    }

    public JLabel getTítulo() {
        return titulo;
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        titulo = new javax.swing.JLabel();
        icono = new javax.swing.JLabel();

        setBackground(new java.awt.Color(97, 130, 229));
        setMaximumSize(new java.awt.Dimension(32767, 70));
        setMinimumSize(new java.awt.Dimension(0, 70));
        setName("");
        setPreferredSize(new java.awt.Dimension(712, 70));

        titulo.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
        titulo.setForeground(new java.awt.Color(255, 255, 255));
        titulo.setText("Título");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(icono, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(titulo, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(246, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(titulo, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addComponent(icono, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
    }// </editor-fold>//GEN-END:initComponents
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel icono;
    private javax.swing.JLabel titulo;
    // End of variables declaration//GEN-END:variables
}
